<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Controller extends CI_Controller
{
	protected $need_login = true;
	
	public function __construct()
	{
		parent::__construct();
		
		/*
		$user = array(
			'is_logged_in'	=> false,
			'user_id'		=> '',
			'user_name'		=> 'Administrator',
			);
		$this->session->set_userdata($user);
		*/
		
		//if (($this->need_login) && ($this->session->userdata('is_logged_in') != TRUE))
		//{
		//	redirect('login', 'location');
		//}
	}
	
	
	protected function loadView($view, $vars = array(), $return = FALSE)
	{
		$this->load->view('header_view', $vars, $return);
		$this->load->view($view, $vars, $return);
		$this->load->view('footer_view', $vars, $return);
	}
}
